package com.xiaobao.campusLostFoundAfter.service;

import com.github.pagehelper.PageInfo;
import com.xiaobao.campusLostFoundAfter.common.Result;
import com.xiaobao.campusLostFoundAfter.pojo.User;

import java.util.List;

/*用户服务接口*/
public interface UserService {
    //添加用户
    Result<String> addUser(User user);

    //获取所有用户
    Result<List<User>> getAllUsers();

    //根据id获取用户
    Result<User> getUserById(String userId);

    //根据id删除用户
    Result<String> deleteUser(String userId);

    //修改用户
    Result<String> updateUser(User user);

    //修改用户头像
    void updateAvatarUrl(String userId, String fileUrl);

    Result<PageInfo<User>> getAllUsersByPage(Integer pageNum, Integer pageSize);
}
